docs: use string status names in code examples#747
docs: use string status names in code examples#747braden-w wants to merge 1 commit intoelysiajs:mainfrom
Conversation
Convert numeric HTTP status codes to descriptive string names across all documentation examples: - 401 to Unauthorized - 403 to Forbidden - 400 to Bad Request - 418 to I'm a teapot String status names provide TypeScript autocompletion and improve code readability.
|
Warning Rate limit exceeded@braden-w has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 22 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (15)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR converts numeric HTTP status codes to descriptive string names across all documentation examples, making the code more readable and demonstrating Elysia's string status name feature.
The conversions follow a consistent pattern:
status(401)becomesstatus('Unauthorized'),status(403)becomesstatus('Forbidden'),status(400)becomesstatus('Bad Request'), andstatus(418)becomesstatus("I'm a teapot"). String status names provide TypeScript autocompletion for all valid HTTP statuses, reducing errors and improving the developer experience.This consolidates conversion changes from PRs #739, #740, #741, #742, #743, and #744 into a single cohesive PR. Those PRs can be closed once this merges.